package com.dubbo.demo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.demo.service.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/demo/dubbo")
public class TestController {
    @Reference(version = "1.0.0")
    private HelloService helloService;

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public String test() {
        helloService.sayHello("test");
        return "success";
    }
}
